package com.bao.work.work01;

import org.junit.Test;

import java.lang.reflect.Constructor;
import java.util.Scanner;

/**
 * @author baoye
 * @date 2024-08-14/18:50
 */
public class Test01 {
    @Test
    public static void main(String[] args){
        try {
            String studentStr = new Scanner(System.in).next();
            String[] split = studentStr.split(":");
            Class studentClass = Class.forName("com.bao.work.work01.Student");
            Constructor constructor = studentClass.getConstructor(String.class, Integer.class, Double.class);
            Student student = (Student) constructor.newInstance(split[0], Integer.parseInt(split[1]), Double.parseDouble(split[2]));
            System.out.println(student);
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
